﻿using System;
using System.Windows;
using System.Windows.Controls;
using Meliose.Core;

namespace Meliose.Controls
{
    public class PropertyNotifierControl : Control, INotifyPropertyChangedEx
    {
        #region INotifyPropertyChangedEx Members

        public event PropertyChangedExEventHandler PropertyChangedEx;
        protected virtual void OnPropertyChangedEx(PropertyChangedExEventArgs e)
        {
            if (PropertyChangedEx != null)
                PropertyChangedEx(this, e);

            OnPropertyChanged(e);
        }

        #endregion

        #region INotifyPropertyChanged Members

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        protected virtual void OnPropertyChanged(System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, e);
        }

        #endregion
    }
}
